<?php
    include "admin_order.php";

    $name=$_REQUEST['name'];
    $startdate=$_REQUEST['startdate'];
    $ordernumber=$_REQUEST['ordernumber'];
    $goodsimg=$_REQUEST['goodsimg'];
    $goodsname=$_REQUEST['goodsname'];
    $goodsnews=$_REQUEST['goodsnews'];
    $goodsprice=$_REQUEST['goodsprice'];
    $goodsnumber=$_REQUEST['goodsnumber'];
    $goodsshop=$_REQUEST['goodsshop'];
    $type=$_REQUEST['type'];
    $goodsid=$_REQUEST['goodsid'];
    $num=$_REQUEST['num'];
    // $condition="待付款";
// var_dump($name,$ordernumber,$startdate,$goodsimg,$goodsname,$goodsnews,$goodsprice,$goodsnumber);

mysqli_select_db($conn,"shopping");

  $sql =  "insert into orders(name,ordernumber,startdate,`condition`,goodsimg,goodsname,goodsnews,goodsprice,goodsnumber,goodsshop,type,goodsid,`num`) values
   ('$name','$ordernumber','$startdate','待付款','$goodsimg','$goodsname','$goodsnews','$goodsprice','$goodsnumber','$goodsshop','$type','$goodsid','$num')";

   $result=mysqli_query($conn,$sql);
     

    if (!$result){
        echo '订单添加失败！';
    }else{
        echo '订单添加成功！';
    }
    
    mysqli_close($conn);
?>
